﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Data;
using DataAccess;

namespace Bussiness
{
    public class FireGroupManager
    {
        public bool AddFire(int groupID, int fireSourece, string fireDscrb)
        {
            FireGroupData fg = new FireGroupData();
            return fg.AddFire(groupID,fireSourece,fireDscrb);
        }
        public int GetLastFireSource()
        {
            FireGroupData fg = new FireGroupData();
            DataTable dt = new DataTable();
            dt = fg.GetLastGroup();
            int lastFireSource = Convert.ToInt32(dt.Rows[0]["FireSource"]);
            return lastFireSource;
        }
        public bool UpdateStatus(string hospitalStatus, string stationStatus)
        {
            FireGroupData fg = new FireGroupData();
            return fg.UpdateStatus(hospitalStatus, stationStatus);
        }
        public bool HasNewCall(int typeCode)
        {
            FireGroupData fg = new FireGroupData();
            return fg.HasNewCall(typeCode);
        }
        

    }
    
}
